Conversation
BreakBB
left a comment
There was a problem hiding this comment.
What exactly is the goal of this PR? Just want to make sure I understand what you are trying to achieve.
performance, see https://stackoverflow.com/questions/26154960/local-vs-global-in-lua |
|
Alright. I know about it, just wanted to make sure I understand the goal since there is explanation on the PR. |
| if LeaPlusDB then | ||
| local LeaPlusDB = LeaPlusDB | ||
| if (LeaPlusDB["DurabilityStatus"] == "On") or PawnInitialize then |
There was a problem hiding this comment.
This changes the logic, because now with just PawnInitialize the button is not moved at all.
Also this should not be part of this PR.
| local OutfitterButtonFrame = OutfitterButtonFrame | ||
| local OutfitterFrame = OutfitterFrame |
There was a problem hiding this comment.
I have no idea what this should do. It doesn't have any positive performance impact, does it?
| local OutfitterButtonFrame = OutfitterButtonFrame | ||
| local OutfitterFrame = OutfitterFrame |
| ---@class Utils | ||
| local Utils = ECSLoader:CreateModule("Utils") | ||
|
|
||
| local GetAddOnInfo = C_AddOns and C_AddOns.GetAddOnInfo or GetAddOnInfo |
There was a problem hiding this comment.
Is C_AddOns.GetAddOnInfo available on all client versions?
|
|
||
| local _Melee = {} | ||
| local _, _, classId = UnitClass("player") | ||
| local playerLevel = UnitLevel("player") |
There was a problem hiding this comment.
We can't query the player level on top level. Otherwise the values are wrong, once the player levels up.
| local _Ranged = {} | ||
|
|
||
| local _, _, classId = UnitClass("player") | ||
| local playerLevel = UnitLevel("player") |
There was a problem hiding this comment.
Same as for Melee: We can't query the player level on top level.
I'm testing it. For now no issues.